#!/usr/bin/python
# -*- coding:utf-8 -*-

from app.db.models.asset_tasks import AssetTasks


class ChangeTaskGroupType(object):

    def __init__(self, ori_type, to_type):
        self.ori_type = ori_type
        self.to_type = to_type

    def run(self):
        t = AssetTasks.objects.filter(taskGroupType=self.ori_type).update(taskGroupType=self.to_type)
        print(f"修改了{t}个")
